<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>
  <ul>
    <!--v-for循环遍历-->
    <li v-for="name in arr" >{{name}}</li>
  </ul>
    <table border="1">
        <caption>人物列表</caption>
        <tr>
            <th>编号</th><th>名字</th><th>年龄</th><th>类型</th>
        </tr>
        <tr v-for="(p,i) in persons">
             <td>{{i+1}}</td><td>{{p.name}}</td><td>{{p.age}}</td><td>{{p.type}}</td>
        </tr>
    </table>
    <table border="1">
        <caption>员工列表</caption>
        <tr>
            <th>编号</th>
            <th>姓名</th>
            <th>工作</th>
            <th>工资</th>
        </tr>
        <tr v-for="(emp,i) in empArr">
            <td>{{i+1}}</td>
            <td>{{emp.name}}</td>
            <td>{{emp.job}}</td>
            <td>{{emp.salary}}</td>
        </tr>
    </table>

</div>
<script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
<script>
   let v = new Vue({
     el:"body>div",
     data:{
        arr:["刘备","关羽","张飞"],
         persons:[{name:"孙悟空",age:500,type:"打野"},
             {name:"猪八戒",age:300,type:"战士"},
             {name:"牛魔王",age:100,type:"辅助"}],
         empArr:[{name:"张三",job:"销售",salary:5000,age:30},
             {name:"李四",job:"人事",salary:3000,age:20},
             {name:"王五",job:"出纳",salary:4000,age:22},
             {name:"赵六",job:"程序员",salary:15000,age:34}]
     }
   })
</script>
</body>
</html>